主题
解压缩字符串成二值化图像 - BitUnpacking
函数简介
将BitPacking压缩生成的字符串解压缩还原为二值化图像。
接口名称
BitUnpackingDLL调用
long BitUnpacking(long instance, string imageStr);参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| imageStr | 字符串 | BitPacking压缩结果字符串 |
示例
SDK 调用
cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
long handle = ola.BitUnpacking("value");csharp
using OLAPlug;
var ola = new OLAPlugServer();
long handle = ola.BitUnpacking("value");python
from OLAPlugServer import OLAPlugServer
ola = OLAPlugServer()
handle = ola.BitUnpacking("value")java
import com.olaplug.OLAPlugServer;
OLAPlugServer ola = new OLAPlugServer();
long handle = ola.BitUnpacking("value");cpp
var ola = com("OlaPlug.OlaSoft")
var handle = ola.BitUnpacking("value")vbscript
Set ola = CreateObject("OlaPlug.OlaSoft")
handle = ola.BitUnpacking("value")text
.局部变量 ola, OLAPlug
ola.创建 ()
handle = ola.BitUnpacking("value")aardio
import OLAPlugServer;
var ola = OLAPlugServer();
var handle = ola.BitUnpacking("value");text
变量 ola <类型 = OLAPlugServer>
ola = 新建 OLAPlugServer
长整数 handle = ola.BitUnpacking("value")cpp
#include "OLAPlugServer.h"
OLAPlugServer ola;
long handle = ola.BitUnpacking("value");原生 DLL 调用
cpp
long instance = CreateCOLAPlugInterFace();
BitUnpacking(instance, "value");csharp
using System.Runtime.InteropServices;
using System.Text;
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long CreateCOLAPlugInterFace();
[DllImport("OLAPlug_x64.dll", CallingConvention = CallingConvention.StdCall)]
static extern long BitUnpacking(long ola, string imageStr);
long instance = CreateCOLAPlugInterFace();
BitUnpacking(instance, "value");python
from ctypes import CDLL, c_int, c_int64, create_string_buffer
ola = CDLL("OLAPlug_x64.dll")
ola.CreateCOLAPlugInterFace.restype = c_int64
instance = ola.CreateCOLAPlugInterFace()
ola.BitUnpacking(instance, "value")返回值
长整数型:成功返回图像句柄,失败返回0。
注意事项
- 输入的字符串必须是 BitPacking 函数压缩生成的有效字符串。
- 返回的图像需调用 FreeImagePtr 释放内存。
